/*
 * COAPI - Copyright (C) 2019-2020 Cocheer Tech. Co., Ltd.
 * All rights reserved
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include "coapi_logger.h"
#include "coapi_dev.h"
#include "coapi_media.h"
#include "coapi_sync.h"

int dev_get_battery(void)
{
    int bat = 50;

    /* to do 获取电量 */

    return bat;
}

int dev_get_storage(int *all, int *free)
{
    *all = 4096;
    *free = 512;

    /* to do 获取存储容量 */

    return 0;
}

int dev_get_charge(void)
{
    int cha = (int)CHARGE_ING;

    /* to do 获取充电状态 */

    return cha;
}

int dev_ota_status(void)
{
    int status = 70;

    /* to do ota 获取升级状态 */

    return status;
}

int dev_power_onoff(void)
{
    /* to do 关机/开机 */

    return 0;
}

int dev_factory(void)
{
    /* to do 恢复出厂设置 */

    return 0;
}

int dev_childlock_open(void)
{
    /* to do 童锁开启 */

    return 0;
}

int dev_childlock_close(void)
{
    /* to do 童锁关闭 */

    return 0;
}

int dev_childlock_status(void)
{
    /* to do 获取童锁状态 */

    return 2;
}

int dev_mute(void)
{
    return 0;
}

int dev_unmute(void)
{
    return 0;
}

int dev_ota_start(void)
{
    return 0;
}

int dev_ota_cancle(void)
{
    return 0;
}

int dev_restart(void)
{
    /* to do 重启 */
    return 0;
}